//
//  UIView+ViewController.swift
//  Weibo
//
//  Created by 孙成宇 on 15/12/2.
//  Copyright © 2015年 mac. All rights reserved.

import UIKit
extension UIView
      {
    func  navController() -> UINavigationController? {

      var next = nextResponder()
        repeat {


    if let nextObj = next as? UINavigationController
    {


        return nextObj

            }
        next = next?.nextResponder()

        }while (next != nil)

        return nil
    }


    }

